package com.huawei.Galenus.service.impl;

import com.huawei.Galenus.dao.SSARepository;
import com.huawei.Galenus.domain.SSA;
import com.huawei.Galenus.service.SSAService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("SSAService")
public class SSAServiceImpl implements SSAService {

    @Autowired
    private SSARepository ssaRepository;

    @Override
    public Integer create(SSA ssa) {
        return ssaRepository.save(ssa);
    }

    @Override
    public List<SSA> getAllSSA() {
        return ssaRepository.selectAll();
    }

    @Override
    public SSA getById(String uid) {
        return ssaRepository.selectById(uid);
    }

}
